package lanqiao;
/**
 * 成绩分析【第十一届】【省赛】【B组】
 * 输入n表示人数，下面n行输入n个0~100的整数表示成绩
 * 输出三行，最高分、最低分、平均分(小数点后两位)
 */
import java.util.Scanner;
public class Prev_224 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int max = 0, min = 100, sum = 0;
        for(int i=0; i<n; i++){
            int x = input.nextInt();
            if(x > max){
                max = x;
            }
            if(x < min){
                min = x;
            }
            sum += x;
        }
        double average = sum / (double)n;
        System.out.println(max);
        System.out.println(min);
        System.out.print(String.format("%.2f",average));
    }
}
